
namespace Metgine
{
namespace Core
{
template <class T>
T* Singleton<T>::m_instance = 0;

template <class T>
Singleton<T>::Singleton()
{
}


template <class T>
Singleton<T>::~Singleton()
{
}

template <class T>
T* Singleton<T>::Get()
{
    if (!m_instance)
        m_instance = new T();

    return m_instance;
}

template <class T>
void Singleton<T>::Destroy()
{
    delete m_instance;
    m_instance = 0;
}

}; // Core
}; // Metgine
